Repository navigation
Add the polars export format - #1727
Merged
Merged
Conversation
A decimal wider than 38 digits now fails with "Schema 'orders': Polars decimals hold at most 38 digits, but 'amount' has a precision of 40.", so the field can be found when several schemas share a field name.
jschoedl
requested changes
Oct 19, 2026
tinyint, smallint, int, integer, float, float4 and real no longer map to a fixed width, since BigQuery and Snowflake read them differently: they now export as Int64 or Float64 from the logical type, as int8 already did.
…exporter # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1552.
datacontract export polarswrites a Python module with onepl.Schemaper schema, and polars does not need to be installed to run it. Widths and precisions come from the physical type (int32,float32,decimal(10,2),timestamp(9)), then from the ODCSformatof an integer or number (i16,u32,f32), then from the logical type. Maps become lists of key-value structs, as Polars reads Arrow maps, and vectors fixed-size arrays.uv run pytest)uv run ruff check --fix && uv run ruff format)